num = list(map(int, input().split()))
j = 1
count = 0
for i in range(len(num)):
    j *= num[i]
print(j)
while j != 0:
    if j % 10 == 0:
        count += 1
    else:
        break
    j = j // 10
print(count)
